package org.saxing.controller;

import org.saxing.entity.User;
import org.saxing.mapper.UserMapper;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * Created by 17020639 on 2017/8/2.
 */
@EnableAutoConfiguration
@RestController
@RequestMapping("/demo")
public class HelloController {

    @Resource
    private UserMapper userMapper;

    @RequestMapping("/hello")
    String hello(){return "hello, mybatis";}

//    @RequestMapping("/findUser2")
//    User findUser2(@RequestParam Integer id){
//        return userMapper.findUserById(id);
//    }

}
